<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Insert title here</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script>
	function trim(s) {
		return s.replace(/^\s*/, "").replace(/\s*$/, "");
	}

	function validate(form) {
		if (trim(document.form.fName.value) == "") {
			alert("First Name empty");
			document.form.fName.focus();
			return false;
		} else if (trim(document.form.lName.value) == "") {
			alert("Last Name empty");
			document.form.lName.focus();
			return false;
		} else if
			(trim(document.form.eId.value) == "")
		{
			alert("Email Id empty");
			document.form.eId.focus();
			return false;
		}
	}
</script>

</head>
<body >
	<form name="form" action="http://localhost:8080/studentmanagementsystem/Servlet1" method="post" onsubmit="return validate(this);">
		<table>
			<tr>
				<td>First Name:</td>
				<td><input size="30" type="text" name="fName"></td>
			</tr>
			<tr>
				<td>Last Name:</td>
				<td><input size="30" type="text" name="lName"></td>
			</tr>
			<tr>
				<td>Course</td>
				<td><select name="course">
						<option value="Select Course">Select Course</option>
						<option value="J2SE">J2SE</option>
						<option value="J2SE+J2EE">J2SE+J2EE</option>
						<option value="ANDROIDE">ANDROIDE</option>
				</select></td>
			</tr>
			<tr>
				<td>EmailId:</td>
				<td><input size="30" type="text" name="eId"></td>
			</tr>
			<tr>
				<td>Mob No :</td>
				<td><input size="10" type="text" name="mob"></td>
			</tr>
			<tr>
				<td colspan="2" align="center"><input type="submit"
					value="Submit"></td>
			</tr>
		</table>
	</form>

</body>
</html>